import Taro, { Component } from '@tarojs/taro'
import Index from './pages/index'

import './app.scss'

class App extends Component {

  config = {
    pages: [

      'pages/index/index',
      'pages/foodDetail/foodDetail',
      'pages/me/me',
      'pages/toHome/toHome',
      'pages/cart/cart',

      'pages/auth/auth',
    ],
    window: {
      backgroundTextStyle: 'light',
      navigationBarBackgroundColor: '#d40073',
      navigationBarTitleText: 'WeChat',
      navigationBarTextStyle: '#fff'
    },
    tabBar: {
      color: "#707070",
      selectedColor: "#d40073",
      backgroundColor: "#FBFBFB",
      borderStyle: "white",
      list: [{
        pagePath: "pages/index/index",
        text: "首页",
        iconPath: "./assets/images/home.png",
        selectedIconPath: "./assets/images/home_active.png"
      },{
        pagePath: 'pages/toHome/toHome',
        text: "食材到家",
        iconPath: "./assets/images/to_home.png",
        selectedIconPath: "./assets/images/to_home_active.png"
      },
        {
          pagePath: 'pages/cart/cart',
          text: "购物车",
          iconPath: "./assets/images/cart.png",
          selectedIconPath: "./assets/images/cart_active.png"
        },
        {
          pagePath: 'pages/me/me',
          text: "会员",
          iconPath: "./assets/images/me_active.png",
          selectedIconPath: "./assets/images/me.png"
        }
        ]
    }
  }
  componentWillMount () {

  }
  componentDidMount () {

  }

  componentDidShow () {

  }

  componentDidHide () {

  }

  componentCatchError () {

  }

  render () {
    return (
      <Index />
    )
  }
}

Taro.render(<App />, document.getElementById('app'))
